﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ue.Infrastructure.RepositoryFramework.Repository;
using Ue.Qcdz.Domain.Collectors;

namespace Ue.Qcdz.Repositories.Collectors
{
    public class CollectorDataQueryWhereClause : IWhereClause
    {
        private ICollectorDataQuery dataQuery;
        public CollectorDataQueryWhereClause(ICollectorDataQuery collectorDataQuery)
        {
            this.dataQuery = collectorDataQuery;
        }
        #region IWhereClause 成员
        public string Clause
        {
            get
            {
                string whereClause = "1=1";
                if (dataQuery.Status)
                    whereClause += " and Status=1";
                return whereClause;
            }
        }

        public System.Data.IDataParameter[] Parameters
        {
            get { return null; }
        }

        #endregion
    }
}
